package com.blacktry.mapper.blog;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.blacktry.entity.blog.Articles;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.blacktry.entity.model.Vo.BlogVo;
import com.blacktry.entity.model.request.ArticleLabelRequest;
import com.blacktry.entity.model.request.ArticlesRequest;
import com.blacktry.entity.model.vueVO.ArticleVo;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author blackTry
 * @since 2022-02-07
 */
@Mapper
public interface ArticlesMapper extends BaseMapper<Articles> {

    //查询热点文章
    public ArticleVo[]  selectHotArticle();

    //根据姓名查询所发布的文章
    public ArticleVo[]  selectArticleByUserName(String userId);

    Page<ArticleLabelRequest> selectArticles(ArticlesRequest articlesRequest, Page<Articles> articlesPage);


    List<BlogVo> findAllForES();
}
